app.factory('ztreeNodesService',['$http',
	function($http){
		var doRequest = function(path){
			return $http({
				method:'GET',
				url:path
			});
		}
		return {
			ztreeNodes：function(path){
				var data = doRequest(path);
 				var temps =  [];
					 temps.push({id:0, pId:-1, name:"资源分类", t:"",open:true });

	                	for(var i=0;i<data.length;i++){
	                	var obj =  { id: data[i].Id, pId: data[i].FatherId, name: data[i].ClassName, t: data[i].ClassLongName, open: true }
	                	temps.push(obj);
	                	}
	             return temps;
			}
		}
	}

]);